#
# pH+
#

require 'ph/ui/caption'
require 'ph/ui/toolbar'

module Ph

  class Window < Ph::Container

    def initialize(caption=nil)
      super()
      @content = Ph::Container.new
      @toolbar = Ph::Toolbar.new
      @caption = Ph::Caption.new(@content)

			self.caption= caption if caption
           
      @body.add(@caption, @toolbar, @content)
    end
    
    def body
      @content
    end
    
    def toolbar
      @toolbar
    end
    
    def caption= (what)
      @caption.title= what
    end
    
    def caption
      @caption.title
    end
      
  end
  
end	
